package cn.edu.zut.controller;

import cn.edu.zut.domain.Dep;
import cn.edu.zut.service.DepService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/dep")
public class DepController {
    @Autowired
    private DepService service;
    @RequestMapping("/findAll.do")
    public @ResponseBody List<Dep> findAll() {
        List<Dep> list = service.findAll();
        return list;
    }
}
